package com.guoxin.artconcurrency.chapter2;

/**
 * @author guoxin
 * @date 2019/8/7
 */
public class VolatileTest {
    private volatile int i = 10;

    public static void main(String[] args) {
        VolatileTest t = new VolatileTest();
        System.out.println(t.i);
    }

    public void add() {
        i++;
    }
}
